package sinfoci.alquimiabtl.notificaciones.utilities;

import sinfoci.alquimiabtl.notificaciones.actividades.Fenix;
import sinfoci.alquimiabtl.notificaciones.actividades.Notificaciones;
import android.content.Context;

import com.parse.Parse;
import com.parse.ParseInstallation;
import com.parse.PushService;

public class SendNotifications {

	public static final SendNotifications instance = new SendNotifications();
	
	public SendNotifications getInstance(){
		return instance;
	}
	
	public void registerCityListener(Context context, Integer city){
		Parse.initialize(context, "VBlypp7A4E0nAX4FMk9Cip7uqU4Ib38irNCRqIXX",
				 "kMYeamAJH1bV471MnkJetpIMTCCPGM59mt1LsHXt");
				 PushService.setDefaultPushCallback(context, Fenix.class);
				 ParseInstallation.getCurrentInstallation().saveInBackground();
				 PushService.subscribe(context,"ciudad"+ city.toString(),
				 Notificaciones.class);
	}
}
